function t(t) {
    return t && t.__esModule ? t : {
        default: t
    };
}

var a = t(require("../../../utils/filter")), e = t(require("../../../api/api")), i = t(require("../../../utils/util")), n = getApp();

Page({
    data: {
        pageNum: 1,
        pageSize: 20,
        hasMore: !0,
        content_list: [],
        teacher_list_length: 0
    },
    onLoad: function() {
        this.fetchFinanceHistoryList();
    },
    fetchFinanceHistoryList: function() {
        var t = this, a = this, i = {
            page: a.data.pageNum
        };
        e.default.financeHistoryList({
            data: i,
            success: function(e) {
                var i = a.data.content_list;
                if (e && e.data) {
                    1 == a.data.pageNum && (i = []);
                    var n = e.data.data;
                    n.forEach(t.mergeFinanceHistoryInfo), n.length < a.data.pageSize ? t.setData({
                        content_list: i.concat(n),
                        hasMore: !1
                    }) : t.setData({
                        content_list: i.concat(n),
                        hasMore: !0,
                        pageNum: a.data.pageNum + 1
                    });
                }
            }
        });
    },
    mergeFinanceHistoryInfo: function(t) {
        t.history_des = a.default.paymentHistoryDesc(t.show_type), t.utc_time_format = i.default.formatCurrentDate(t.utc_time), 
        t.itc_value = (t.itc_usd / 100).toFixed(2), t.itc_value_cny = a.default.convertCurrencyToCNY(t.itc_usd, n.globalData.currencyDatum).toFixed(2);
    },
    onReachBottom: function(t) {
        var a = this;
        a.data.hasMore && a.fetchFinanceHistoryList();
    }
});